Form = function(options){
	var _options = {};
	$.extend(_options,this._options,options);
	$.extend(this,{
		_options:_options
	});
	this._init();
};
Form.prototype = {
	_options:{
		method:"POST",
		action:"#",
		target:"_self",
		data:[]
	},
	_init:function(){
	},
	submit:function(){
		var form = document.createElement("form");
		form.setAttribute("method",this._options.method);
		form.setAttribute("action",this._options.action);
		form.setAttribute("target",this._options.target);
		form.style.display="none";
		
		if(this._options.data){
			for(var key in this._options.data){
				var value = this._options.data[key];
				if(value instanceof Array){
					for(v in value){
						var checkbox = document.createElement("input");
						checkbox.setAttribute("name",key);
						checkbox.setAttribute("type","checkbox");
						checkbox.setAttribute("checked","checked");
						checkbox.setAttribute("value",value[v]);
						form.appendChild(checkbox);
					}
				}else{
					var inputText = document.createElement("input");
					inputText.setAttribute("name",key);
					inputText.setAttribute("type","hidden");
					inputText.setAttribute("value",value);
					form.appendChild(inputText);
				}
			}
		}
		document.body.appendChild(form);
		form.submit();
	}
};